package maosui.model;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by wdj on 14-8-10.
 */
@Entity
@Table(name = "51lpz_online_live_log")
public class LiveLogEntity {
    private int id;
    private int companyId;
    private int studentId;
    private Timestamp addTime;

    @Id
    @Column(name = "id", nullable = false, insertable = true, updatable = true)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "company_id", nullable = false, insertable = true, updatable = true)
    public int getCompanyId() {
        return companyId;
    }

    public void setCompanyId(int companyId) {
        this.companyId = companyId;
    }

    @Basic
    @Column(name = "student_id", nullable = false, insertable = true, updatable = true)
    public int getStudentId() {
        return studentId;
    }

    public void setStudentId(int studentId) {
        this.studentId = studentId;
    }

    @Basic
    @Column(name = "add_time", nullable = false, insertable = true, updatable = true)
    public Timestamp getAddTime() {
        return addTime;
    }

    public void setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        LiveLogEntity that = (LiveLogEntity) o;

        if (companyId != that.companyId) return false;
        if (id != that.id) return false;
        if (studentId != that.studentId) return false;
        if (addTime != null ? !addTime.equals(that.addTime) : that.addTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + companyId;
        result = 31 * result + studentId;
        result = 31 * result + (addTime != null ? addTime.hashCode() : 0);
        return result;
    }
}
